﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
using System.Windows.Forms;

namespace MNNUTEM
{

    class Conexion
    {
        public static MySqlConnection conmysql;

        public MySqlConnection conn()
        {
       
             try
            {
       conmysql = new MySqlConnection("Server=190.196.10.86; Database=myonatur_utem; Uid=myonatur_grupo; Pwd=utem123.");
        conmysql.Open();
        return conmysql;
  
             }


            catch (Exception ex)
            {

                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw new Exception("Se ha producido un error:", ex);
            }




    }
    }
}
